#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
   File Name：    hover_page.py
   Author :       zyq
   CreateDate：   2024/8/1 16:48
   Remark :  悬浮测试
-------------------------------------------------
"""

from guitesting.common.bash.bash_ui.page_element import PageElement, BasePage


class HoverPage(BasePage):
    """悬浮（hover）测试"""

    url = """http://xn--6frwj470ei1s2kl.com/demo/hover"""
    # 悬浮（hover）
    hover_link = PageElement(xpath="/html/body/div[1]/div/div/main/div/div[2]/a[3]")
    hover_button = PageElement(xpath="/html/body/div[1]/div/div/main/div/button/span[2]/i")

    def hover_test(self):
        """悬浮（hover）测试"""
        # 打开悬浮页面
        self.get_url(url=self.url)

        # self.hover_link.click_element()
        # 悬浮三秒
        self.hover_button.mouse_over(times=3)


